import request from '@/utils/request'

// 查询环鄱赛-站点列表
export function listSite(query) {
  return request({
    url: '/hps/site/list',
    method: 'get',
    params: query
  })
}

// 查询环鄱赛-站点详细
export function getSite(id) {
  return request({
    url: '/hps/site/' + id,
    method: 'get'
  })
}

// 新增环鄱赛-站点
export function addSite(data) {
  return request({
    url: '/hps/site',
    method: 'post',
    data: data
  })
}

// 修改环鄱赛-站点
export function updateSite(data) {
  return request({
    url: '/hps/site',
    method: 'put',
    data: data
  })
}

// 删除环鄱赛-站点
export function delSite(id) {
  return request({
    url: '/hps/site/' + id,
    method: 'delete'
  })
}

// 导出环鄱赛-站点
export function exportSite(query) {
  return request({
    url: '/hps/site/export',
    method: 'get',
    params: query
  })
}

// 查询赛点是否存在报名人数
export function getSiteNum(siteId) {
  return request({
    url: '/hps/sitegroup/getnum/' + siteId,
    method: 'get'
  })
}

//
export function cascaderSite(query) {
  return request({
    url: '/hps/site/siteCascader',
    method: 'get',
    params: query
  })
}
